package com.spzx.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.spzx.order.api.domain.OrderInfo;
import com.spzx.order.domain.form.OrderForm;
import com.spzx.order.domain.vo.TradeVo;

import java.util.List;

/**
 * 订单Service接口
 *
 * @author atguigu
 * @date 2024-11-02
 */
public interface IOrderInfoService extends IService<OrderInfo> {

    /**
     * 查询订单列表
     *
     * @param orderInfo 订单
     * @return 订单集合
     */
    public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);

    /**
     * 根据订单id查询订单详情
     *
     * @param id
     * @return
     */
    OrderInfo getOrderDetailsByOrderId(Long id);

    /**
     * 去结算的方法
     *
     * @return
     */
    TradeVo trade();

    /**
     * 提交订单的方法
     *
     * @param orderForm
     * @return
     */
    Long submitOrder(OrderForm orderForm);

    TradeVo buy(Long skuId);

    List<OrderInfo> selectUserOrderInfoList(Integer orderStatus);

    void cancelOrder(Long orderId);

    OrderInfo getByOrderNo(String orderNo);

    void processPaySuccess(String orderNo);
}
